package com.ruoyi.article.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.article.mapper.ArticleDetailMapper;
import com.ruoyi.article.domain.ArticleDetail;
import com.ruoyi.article.service.IArticleDetailService;

/**
 * 文章详情 Service业务层处理
 * 
 * @author rey
 * @date 2022-02-04
 */
@Service
public class ArticleDetailServiceImpl implements IArticleDetailService 
{
    @Autowired
    private ArticleDetailMapper articleDetailMapper;

    /**
     * 查询文章详情 
     * 
     * @param articleDetailId 文章详情 主键
     * @return 文章详情 
     */
    @Override
    public ArticleDetail selectArticleDetailByArticleDetailId(Long articleDetailId)
    {
        return articleDetailMapper.selectArticleDetailByArticleDetailId(articleDetailId);
    }

    /**
     * 查询文章详情 列表
     * 
     * @param articleDetail 文章详情 
     * @return 文章详情 
     */
    @Override
    public List<ArticleDetail> selectArticleDetailList(ArticleDetail articleDetail)
    {
        return articleDetailMapper.selectArticleDetailList(articleDetail);
    }

    /**
     * 新增文章详情 
     * 
     * @param articleDetail 文章详情 
     * @return 结果
     */
    @Override
    public int insertArticleDetail(ArticleDetail articleDetail)
    {
        return articleDetailMapper.insertArticleDetail(articleDetail);
    }

    /**
     * 修改文章详情 
     * 
     * @param articleDetail 文章详情 
     * @return 结果
     */
    @Override
    public int updateArticleDetail(ArticleDetail articleDetail)
    {
        return articleDetailMapper.updateArticleDetail(articleDetail);
    }

    /**
     * 批量删除文章详情 
     * 
     * @param articleDetailIds 需要删除的文章详情 主键
     * @return 结果
     */
    @Override
    public int deleteArticleDetailByArticleDetailIds(Long[] articleDetailIds)
    {
        return articleDetailMapper.deleteArticleDetailByArticleDetailIds(articleDetailIds);
    }

    /**
     * 删除文章详情 信息
     * 
     * @param articleDetailId 文章详情 主键
     * @return 结果
     */
    @Override
    public int deleteArticleDetailByArticleDetailId(Long articleDetailId)
    {
        return articleDetailMapper.deleteArticleDetailByArticleDetailId(articleDetailId);
    }
}
